package service.serviceImpl;

import dao.Impl.StudentDaoImpl;
import dao.StudentDao;
import po.Course;
import po.Student;
import service.StudentService;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

public class StudentServiceImpl implements StudentService {

    private StudentDao dao = new StudentDaoImpl();

    @Override
    public Student queryStudentByNameAndPassword(String username, String password) {
        Student student = dao.queryStudentByNameAndPassword(username, password);
        return student;
    }




    @Override
    public List<Student> queryAllStudent(Integer id) {
        List<Student> students = dao.queryAllStudent(id);
        return  students;
    }

    @Override
    public void addStudent(Student student) {
        dao.addStudent(student);
    }

    @Override
    public void  deleteStudent(Student student) {
        dao.deleteStudent(student);
    }

    @Override
    public  void  updateStudent(Student student) {
        dao.updateStudent(student);
    }

    @Override
    public Student queryOneStudent(Integer id) {
        Student student = dao.queryOneStudent(id);
        return student;

    }


}
